package com.cby.springboot.demo.mapper;

import com.cby.springboot.demo.bean.AdminPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminPermissionMapper {

    @Select("select * from admin_permission where name = #{name,jdbcType=VARCHAR}")
    List<AdminPermission> findByName(String name);

    @Select("select * from admin_permission where id = #{id}")
    AdminPermission findById(@Param("id") int id);

    @Select("select * from admin_permission")
    List<AdminPermission> findAll();
}
